Conversion From Earlier Versions
Converting an existing Windows program from earlier versions of QuickTime to QuickTime 3 is relatively simple, but there are a few changes that you should be aware of. These include:
-
The calls for initializing and terminating the QuickTime Media Layer are now
InitializeQTML
and
TerminateQTML instead of QTInitialize and QTTerminate, and the meaning of the initialization routine's parameter has changed; see
Initializing and Terminating QTML and QuickTime
for more information. Note, however, that the initialization and termination calls for QuickTime itself,
EnterMovies
and
ExitMovies
, remain the same as before.
-
QuickTime calls now use the Mac OS data types
Point
and
Rect
to represent points and rectangles, rather than the corresponding Windows types
POINT
and
RECT
. This is because the QuickTime routines expect the coordinates to be specified as 16-bit integers instead of 32 bits, as they are in Windows 95 and Windows NT. For example, the QuickTime routine
GetMovieBox
is now defined as
void
GetMovieBox
(Movie theMovie,
Rect *boxRect)
instead of
void
GetMovieBox
(Movie mMovie,
LPRECT lprcMovieRect)
as in earlier versions.
-
QuickTime routines that formerly accepted a Windows
window handle (
HWND
) as a parameter now implicitly use the
current QTML
graphics port instead, as discussed under
Graphics Ports. For example, the function
NewMovieController
now takes only three parameters
ComponentInstance
NewMovieController
(Movie theMovie,
const Rect *movieRect,
long someFlags)
instead of four. To obtain the port corresponding to a window, you must first register the window with QTML by calling
CreatePortAssociation, then use
GetHWNDPort
to get the port pointer. Remember to deregister the window with
DestroyPortAssociation
before destroying the window.
-
The QuickTime call for driving a movie controller is now
MCIsPlayerEvent
instead of
MCIsPlayerMessage
; see
Movie Controllers
for details.
-
As discussed under
File Selection Dialogs, the QuickTime function
OpenMovieFile
now accepts a Mac OS file-system specification record (
FSSpec
) identifying the file to be opened, instead of a string containing the
file name.
-
QuickTime routines that operate on movie files, such as
NewMovieFromFile
, now use a Mac OS-style
file reference number to identify the file instead of a Windows file reference.
-
The QuickTime call
DereferenceHandle
is no longer necessary with QuickTime 3 .
© 1998 Apple Computer, Inc.| Previous | Chapter Contents | Chapter Top | Roadmap | Next |